<?php


namespace common\behavior;

use common\service\TaskMemberService;

/**
 * 异步增加工单用户
 */
class UpdateWorkOrderUserAddedBehavior
{

    public function run($params)
    {
        $data = [
            'user_id' => array_column($params['add'], 'user_id'),
            'task_work_order_id' => $params['work_order_id'],
            'type' => 'add'
        ];
        APP_DEBUG && trace(var_export($data, true), 'DEBUG');
        TaskMemberService::getInstance()->taskWorkOrderUserAddIm($data['user_id'], $data['task_work_order_id']);

    }
}
